﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Windows.Data;
using WhiteRepositoryExplorer.Model;

namespace WhiteRepositoryExplorer.Converters
{
    public class RecentFilesToListOfStringsConverter : IValueConverter
    {


        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var files = value as List<RecentFile>;
            return files.Select(f => f.FilePath).ToList();
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
